package com.unity3d.fragment;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import org.w3c.dom.Text;

import java.util.concurrent.TimeoutException;


public class BlankFragment1 extends Fragment {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // 方法一
        View view=inflater.inflate(R.layout.fragment_blank1, container, false);
//        TextView textView=view.findViewById(R.id.textView);
//        textView.setText("湖南中医药大学！");
//        textView.setTextColor(getResources().getColor(R.color.purple_200));
        return view;
    }

//    @Override
//    方法二
    /*public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        Button button=getActivity().findViewById(R.id.button);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                button.setText("成功获取Activity组件");
            }
        });

    }*/
}